import { getRequest, postRequest } from '/@/lib/axios';

export const messageApi = {
  // 通知消息-分页查询
  queryMessage: (param) => {
    return postRequest('/mms/message/queryMyMessage', param);
  },
  // 通知消息-查询未读消息数
  queryUnreadCount: () => {
    return getRequest('/mms/message/getUnreadCount');
  },
  // 通知消息-标记已读
  updateReadFlag: (messageId) => {
    return getRequest(`/mms/message/read/${messageId}`);
  },

  //通知消息-分页查询
  queryAdminMessage: (param) => {
    return postRequest('/mms/message/query', param);
  },

  //通知消息-新建
  sendMessages: (param) => {
    return postRequest('/mms/message/sendMessages', param);
  },

  //通知消息-删除
  deleteMessage: (messageId) => {
    return getRequest(`/mms/message/delete/${messageId}`);
  },
};
